<!DOCTYPE html>



  


<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">



  
  
    
    
  <script src="/myblogs/lib/pace/pace.min.js?v=1.0.2"></script>
  <link href="/myblogs/lib/pace/pace-theme-minimal.min.css?v=1.0.2" rel="stylesheet">







<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
















  
  
  <link href="/myblogs/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />







<link href="/myblogs/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />

<link href="/myblogs/css/main.css?v=5.1.4" rel="stylesheet" type="text/css" />


  <link rel="apple-touch-icon" sizes="180x180" href="/myblogs/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/myblogs/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/myblogs/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/myblogs/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="IDEA," />





  <link rel="alternate" href="/myblogs/atom.xml" title="天行健の博客" type="application/atom+xml" />






<meta name="description" content="1.设置maven  在File-&gt;settings-&gt;搜索maven Mavan home directory–设置maven安装包的bin文件夹所在的位置 User settings file–设置setting文件所在的位置 Local repository–设置本地仓库的   2.IDEA 设置代码行宽度  在File-&gt;settings-&gt;Editor-&gt;C">
<meta property="og:type" content="article">
<meta property="og:title" content="idea 这样配置，快到飞起">
<meta property="og:url" content="https://joy_24.gitee.io/2020/11/26/idea-hotKey-1/index.html">
<meta property="og:site_name" content="天行健の博客">
<meta property="og:description" content="1.设置maven  在File-&gt;settings-&gt;搜索maven Mavan home directory–设置maven安装包的bin文件夹所在的位置 User settings file–设置setting文件所在的位置 Local repository–设置本地仓库的   2.IDEA 设置代码行宽度  在File-&gt;settings-&gt;Editor-&gt;C">
<meta property="og:locale">
<meta property="og:image" content="https://joy_24.gitee.io/myblogs/2020/11/26/idea-hotKey-1/0.jpg">
<meta property="og:image" content="https://joy_24.gitee.io/myblogs/2020/11/26/idea-hotKey-1/1.jpg">
<meta property="og:image" content="https://joy_24.gitee.io/myblogs/2020/11/26/idea-hotKey-1/2.jpg">
<meta property="og:image" content="https://joy_24.gitee.io/myblogs/2020/11/26/idea-hotKey-1/3.jpg">
<meta property="og:image" content="https://joy_24.gitee.io/myblogs/2020/11/26/idea-hotKey-1/4.jpg">
<meta property="og:image" content="https://joy_24.gitee.io/myblogs/2020/11/26/idea-hotKey-1/5.jpg">
<meta property="og:image" content="https://joy_24.gitee.io/myblogs/2020/11/26/idea-hotKey-1/6.jpg">
<meta property="og:image" content="https://joy_24.gitee.io/myblogs/2020/11/26/idea-hotKey-1/7.jpg">
<meta property="og:image" content="https://joy_24.gitee.io/myblogs/2020/11/26/idea-hotKey-1/8.jpg">
<meta property="og:image" content="https://joy_24.gitee.io/myblogs/2020/11/26/idea-hotKey-1/9.jpg">
<meta property="article:published_time" content="2020-11-26T06:33:54.000Z">
<meta property="article:modified_time" content="2021-10-26T06:57:39.195Z">
<meta property="article:author" content="Joy Wang">
<meta property="article:tag" content="IDEA">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://joy_24.gitee.io/myblogs/2020/11/26/idea-hotKey-1/0.jpg">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '',
    scheme: 'Mist',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":true,"scrollpercent":true,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: '博主'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://joy_24.gitee.io/2020/11/26/idea-hotKey-1/"/>





  <title>idea 这样配置，快到飞起 | 天行健の博客</title>
  








<meta name="generator" content="Hexo 5.2.0"></head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>
    <a target="_blank" rel="noopener" href="https://github.com/JoyWJ" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>


    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/myblogs/"  class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">天行健の博客</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle">一个开发博客的初学者。</p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/myblogs/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-about">
          <a href="/myblogs/about" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-user"></i> <br />
            
            关于
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/myblogs/tags" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/myblogs/categories" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/myblogs/archives" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
            
            归档
          </a>
        </li>
      
        
        <li class="menu-item menu-item-commonweal">
          <a href="/myblogs/404.html" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-heartbeat"></i> <br />
            
            公益404
          </a>
        </li>
      

      
        <li class="menu-item menu-item-search">
          
            <a href="javascript:;" class="popup-trigger">
          
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <div class="popup search-popup local-search-popup">
  <div class="local-search-header clearfix">
    <span class="search-icon">
      <i class="fa fa-search"></i>
    </span>
    <span class="popup-btn-close">
      <i class="fa fa-times-circle"></i>
    </span>
    <div class="local-search-input-wrapper">
      <input autocomplete="off"
             placeholder="搜索..." spellcheck="false"
             type="text" id="local-search-input">
    </div>
  </div>
  <div id="local-search-result"></div>
</div>



    </div>
  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://joy_24.gitee.io/myblogs/2020/11/26/idea-hotKey-1/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="name" content="">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/myblogs/uploads/avatar.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="天行健の博客">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">idea 这样配置，快到飞起</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2020-11-26T14:33:54+08:00">
                2020-11-26
              </time>
            

            

            
          </span>

          
            <span class="post-category" >
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
                  <a href="/myblogs/categories/IDE/" itemprop="url" rel="index">
                    <span itemprop="name">IDE</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
          

          
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  3k
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  12
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="1-设置maven"><a href="#1-设置maven" class="headerlink" title="1.设置maven"></a>1.设置maven</h1><blockquote>
<ol>
<li>在File-&gt;settings-&gt;搜索maven</li>
<li>Mavan home directory–设置maven安装包的bin文件夹所在的位置</li>
<li>User settings file–设置setting文件所在的位置</li>
<li>Local repository–设置本地仓库的</li>
</ol>
</blockquote>
<h1 id="2-IDEA-设置代码行宽度"><a href="#2-IDEA-设置代码行宽度" class="headerlink" title="2.IDEA 设置代码行宽度"></a>2.IDEA 设置代码行宽度</h1><blockquote>
<ol>
<li>在File-&gt;settings-&gt;Editor-&gt;CodeStyle</li>
<li>有人会问，如果输入的代码超出宽度界线时，如何让IDE自动将代码换行？有两种方式！</li>
<li>第一种，在上述的“Right margin (columns)”的下方，有“Wrap when typing reaches right margin”选项，选中它，是什么效果呢？</li>
<li>随着输入的字符的增加，当代码宽度到达界线时，IDEA会自动将代码换行。</li>
<li>第一种方式是在输入代码时触发，还有第二种方式，在File-&gt;settings-&gt;CodeStyle-&gt;Java中，选中“Wrapping and Braces”选项卡，</li>
<li>在“Keep when reformatting”中有一个“Ensure rigth margin is not exceeded”，选中它，是什么效果呢？</li>
<li>从配置项的字面意思很容易理解，在格式化Java代码时，确保代码没有超过宽度界线。</li>
<li>即输入的代码超出界线后，</li>
</ol>
</blockquote>
<h1 id="3-IDEA-提示不区分大小写"><a href="#3-IDEA-提示不区分大小写" class="headerlink" title="3.IDEA 提示不区分大小写"></a>3.IDEA 提示不区分大小写</h1><blockquote>
<ol>
<li>首先打开File—–&gt;setting</li>
<li>然后，输入：sensitive</li>
<li>将右侧的case sensitive completion 修改为NONE</li>
</ol>
</blockquote>
<h1 id="4-IntelliJ强制更新Maven-Dependencies"><a href="#4-IntelliJ强制更新Maven-Dependencies" class="headerlink" title="4.IntelliJ强制更新Maven Dependencies"></a>4.IntelliJ强制更新Maven Dependencies</h1><blockquote>
<p>1.Intellj自动载入Mave依赖的功能很好用，但有时候会碰到问题，导致pom文件修改却没有触发自动重新载入的动作，此时需要手动强制更新依赖。</p>
<p>2.如下：</p>
<ol>
<li>手动删除ProjectSettings里面的Libraries内容；</li>
<li>在MavenProject的试图里clean一下，删除之前编译过的文件；</li>
<li>项目右键-》Maven-》Reimport</li>
<li>Ok，此时发现依赖已经建立！</li>
</ol>
</blockquote>
<h1 id="5-idea的环境配置默认保存位置"><a href="#5-idea的环境配置默认保存位置" class="headerlink" title="5.idea的环境配置默认保存位置"></a>5.idea的环境配置默认保存位置</h1><blockquote>
<ol>
<li>idea的环境配置默认保存位置:C:\Users\xxxxxxxxx.IntelliJIdea14,xxxxxx代表用户目录,</li>
<li>可以对该目录进行备份,一但环境出问题恢复此配置即可.</li>
<li>可以在%IDEA_HOME%/bin/idea.properties中修改该配置路径.</li>
</ol>
</blockquote>
<h1 id="6-隐藏不想看到的文件或者文件夹（类似eclipse的filter功能）"><a href="#6-隐藏不想看到的文件或者文件夹（类似eclipse的filter功能）" class="headerlink" title="6.隐藏不想看到的文件或者文件夹（类似eclipse的filter功能）"></a><code>6.隐藏不想看到的文件或者文件夹（类似eclipse的filter功能）</code></h1><blockquote>
<ol>
<li>intellij idea 隐藏不想看到的文件或者文件夹（类似eclipse的filter功能）</li>
<li>打开intellij –&gt;:&gt;File–&gt;&gt;Settings–&gt;&gt;搜索FileTypes</li>
</ol>
</blockquote>
<h1 id="7-修改为Eclipse快捷键"><a href="#7-修改为Eclipse快捷键" class="headerlink" title="7.修改为Eclipse快捷键"></a>7.修改为Eclipse快捷键</h1><blockquote>
<ol>
<li>File-&gt;Settings-&gt;Keymap=&gt;Keymaps改为Eclipse copy</li>
</ol>
</blockquote>
<h1 id="8-修改默认设置–default-setting"><a href="#8-修改默认设置–default-setting" class="headerlink" title="8.修改默认设置–default setting"></a>8.修改默认设置–default setting</h1><blockquote>
<ol>
<li>修改默认设置–default setting</li>
</ol>
</blockquote>
<h1 id="9-修改智能提示快捷键"><a href="#9-修改智能提示快捷键" class="headerlink" title="9.修改智能提示快捷键"></a>9.修改智能提示快捷键</h1><blockquote>
<ol>
<li>File-&gt;Settings-&gt;Keymap-&gt;Main menu -&gt;Code-&gt;Completion-&gt;Basic=&gt;修改为Ctrl+Alt+Enter</li>
<li>保存时把冲突的Remove掉。</li>
<li>File-&gt;Settings-&gt;Keymap-&gt;EditorActions-&gt;CompleteCurrentStatement=&gt;修改为Ctrl+;</li>
</ol>
</blockquote>
<h1 id="10-查找快捷键冲突问题处理"><a href="#10-查找快捷键冲突问题处理" class="headerlink" title="10.查找快捷键冲突问题处理"></a>10.查找快捷键冲突问题处理</h1><blockquote>
<ol>
<li>File-&gt;Settings-&gt;Keymap-&gt;Main menu -&gt;Edit-&gt;Find=&gt;修改Find…和Replace…分别改为Ctrl+F 和Ctrl+R</li>
</ol>
</blockquote>
<h1 id="11-显示行号"><a href="#11-显示行号" class="headerlink" title="11.显示行号"></a>11.显示行号</h1><blockquote>
<ol>
<li>File-&gt;Settings-&gt;Editor-&gt;General-&gt;Appearance=&gt;Show line numbers选中</li>
</ol>
</blockquote>
<h1 id="12-代码智能提示，忽略大小写"><a href="#12-代码智能提示，忽略大小写" class="headerlink" title="12.代码智能提示，忽略大小写"></a>12.代码智能提示，忽略大小写</h1><blockquote>
<ol>
<li>File-&gt;Settings -&gt; Editor-&gt;CodeCompletion里把Case sensitive completion设置为None就可以了</li>
</ol>
</blockquote>
<h1 id="13-用-标识编辑过的文件"><a href="#13-用-标识编辑过的文件" class="headerlink" title="13.用*标识编辑过的文件"></a>13.用*标识编辑过的文件</h1><blockquote>
<ol>
<li>Editor–&gt;General–&gt;EditorTabs</li>
<li>在IDEA中，你需要做以下设置,这样被修改的文件会以*号标识出来，你可以及时保存相关的文件。</li>
<li>“Mark modifyied tabs with asterisk”</li>
</ol>
</blockquote>
<h1 id="14-关闭自动代码提示"><a href="#14-关闭自动代码提示" class="headerlink" title="14.关闭自动代码提示"></a>14.关闭自动代码提示</h1><blockquote>
<ol>
<li>Preferences=&gt; IDE Settings=&gt;Editor=&gt;CodeCompletion=&gt;Autopopup documentation in (ms)</li>
</ol>
</blockquote>
<h1 id="15-常用快捷键"><a href="#15-常用快捷键" class="headerlink" title="15.常用快捷键"></a>15.常用快捷键</h1><blockquote>
<ol>
<li>ØTop#10切来切去：Ctrl+Tab</li>
<li>ØTop#9选你所想【选中上下文相关联代码】：Ctrl+W</li>
<li>ØTop#8代码生成：Template/Postfix+Tab</li>
<li>ØTop#7发号施令：Ctrl+Shift+A</li>
<li>ØTop#6无处藏身：Shift+Shift</li>
<li>ØTop#5自动完成：Ctrl+Shift+Enter</li>
<li>ØTop#4创造万物：Alt+Insert</li>
</ol>
<p>使用前三名！</p>
<ol>
<li>ØTop#1智能补全：Ctrl+Shift+Space</li>
<li>ØTop#1自我修复：Alt+Enter</li>
<li>ØTop#1重构一切：Ctrl+Shift+Alt+T</li>
</ol>
<p>其他辅助</p>
<ol>
<li>以上这些神键配上一些辅助快捷键，即可让你的双手90%以上的时间摆脱鼠标，专注于键盘仿佛在进行钢琴表演。这些不起眼却是至关重要的最后一块拼图有：</li>
<li>Ø命令：Ctrl+Shift+A可以查找所有Intellij的命令，并且每个命令后面还有其快捷键。所以它不仅是一大神键，也是查找学习快捷键的工具。</li>
<li>Ø新建：Alt+Insert可以新建类、方法等任何东西。</li>
<li>Ø格式化代码：格式化import列表Ctrl+Alt+O，格式化代码Ctrl+Alt+L。</li>
<li>Ø切换窗口：Alt+Num，常用的有1-项目结构，3-搜索结果，4/5-运行调试。Ctrl+Tab切换标签页，Ctrl+E/Ctrl+Shift+E打开最近打开过的或编辑过的文件。</li>
<li>Ø单元测试：Ctrl+Alt+T创建单元测试用例。</li>
<li>Ø运行：Alt+Shift+F10运行程序，Shift+F9启动调试，Ctrl+F2停止。</li>
<li>Ø调试：F7/F8/F9分别对应Step into，Step over，Continue。</li>
<li>此外还有些我自定义的，例如水平分屏Ctrl+|等，和一些神奇的小功能Ctrl+Shift+V粘贴很早以前拷贝过的，Alt+Shift+Insert(块选)进入到列模式进行按列选中</li>
</ol>
</blockquote>
<h1 id="16-svn-不能同步代码问题修正"><a href="#16-svn-不能同步代码问题修正" class="headerlink" title="16.svn 不能同步代码问题修正"></a>16.svn 不能同步代码问题修正</h1><blockquote>
<p>File-&gt;Settings-&gt;Subversion-&gt;General=&gt;Use command line client 选中</p>
<ol>
<li>使用command line方式需要指定svn.exe的路径,例如:D:\tools\TortoiseSVN\bin\svn.exe</li>
<li>注意,安装TortoiseSVN时路径中不要带空格,例如:C:\Program Files\TortoiseSVN\bin\svn.exe就会报错.</li>
<li>安装TortoiseSVN选择全部安装组件,否则可能没有svn.exe</li>
</ol>
</blockquote>
<h1 id="17-设置idea的SVN忽略掉-iml文件"><a href="#17-设置idea的SVN忽略掉-iml文件" class="headerlink" title="17.设置idea的SVN忽略掉*.iml文件"></a>17.设置idea的SVN忽略掉*.iml文件</h1><blockquote>
<ol>
<li>Editor-&gt;FileTypes=&gt;Ignore files and folders增加*.iml;</li>
<li>在lgnore files and folesrs中输入.idea;注意要”;”结尾。你就可以隐藏.idea文件夹了</li>
</ol>
</blockquote>
<h1 id="18-改变编辑文本字体大小"><a href="#18-改变编辑文本字体大小" class="headerlink" title="18.改变编辑文本字体大小"></a>18.改变编辑文本字体大小</h1><blockquote>
<ol>
<li>File-&gt; settings -&gt; EDITOR COLORS &amp; FONTS -&gt; FONT -&gt; SIZE</li>
</ol>
</blockquote>
<h1 id="19-IDEA编码设置"><a href="#19-IDEA编码设置" class="headerlink" title="19.IDEA编码设置"></a>19.IDEA编码设置</h1><blockquote>
<ol>
<li>FILE -&gt; SETTINGS -&gt; FILE ENCODINGS =&gt; IDE ENCODING</li>
<li>FILE -&gt; SETTINGS -&gt; FILE ENCODINGS =&gt;ProjectEncoding</li>
<li>FILE -&gt; SETTINGS -&gt; FILE ENCODINGS =&gt;Default encoding for properties files</li>
<li>FILE -&gt; SETTINGS -&gt; FILE ENCODINGS =&gt;Transparentnative-to-ascii conversion</li>
</ol>
</blockquote>
<h1 id="20-Live-Templates"><a href="#20-Live-Templates" class="headerlink" title="20.Live Templates"></a>20.Live Templates</h1><blockquote>
<p>System.out.println 快捷输出</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">“abc”.sout &#x3D;&gt;System.out.println(&quot;abc&quot;);</span><br></pre></td></tr></table></figure>

<p>在eclipse中使用方式为： <code>sysout=&gt;System.out.println();</code></p>
</blockquote>
<blockquote>
<p>for循环</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br></pre></td><td class="code"><pre><span class="line"></span><br><span class="line"></span><br><span class="line">List&lt;String&gt; list &#x3D;newArrayList&lt;String&gt;();</span><br></pre></td></tr></table></figure>

<p>输入: list.for即可输出</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">for(String s:list)&#123;&#96;&#96;&#125;</span><br></pre></td></tr></table></figure>
</blockquote>
<h1 id="21-配置tomcat参数"><a href="#21-配置tomcat参数" class="headerlink" title="21.配置tomcat参数"></a>21.配置tomcat参数</h1><blockquote>
<ol>
<li>vm options:-Xms256m-Xmx512m-XX:PermSize=128m-XX:MaxPermSize=256m</li>
</ol>
</blockquote>
<h1 id="22-idea安装插件的方法"><a href="#22-idea安装插件的方法" class="headerlink" title="22.idea安装插件的方法"></a>22.idea安装插件的方法</h1><blockquote>
<ol>
<li>以IntelliJ IDEA 14.0.1安装findbugs插件为例：</li>
<li>(1)在线方式:进入File-&gt;setting-&gt;plugins-&gt;browse repositorits 搜索你要下载的插件名称，</li>
<li>右侧可以找到下载地址,完成后按提示重启即可.</li>
<li>(2)离线安装:下载findbugs插件地址：<a target="_blank" rel="noopener" href="http://plugins.jetbrains.com/plugin/3847">http://plugins.jetbrains.com/plugin/3847</a>,</li>
<li>将下载的FindBugs-IDEA-0.9.994.zip,安装插件：进入File-&gt;setting-&gt;plugins=&gt; Install plugin from disk…</li>
<li>定位到到刚才下载的jar,点击ok,完成后按提示重启即可.</li>
<li>插件安装的位置在C:\Users\xxxxxxxxx.IntelliJIdea14\config\plugins\插件名下.</li>
<li>安装iBATIS/MyBatis min-plugin插件</li>
</ol>
</blockquote>
<h1 id="23-调整idea启动时的内存配置参数"><a href="#23-调整idea启动时的内存配置参数" class="headerlink" title="23.调整idea启动时的内存配置参数"></a>23.调整idea启动时的内存配置参数</h1><blockquote>
<ol>
<li>%IDEA_HOME%/bin/idea.exe.vmoptions</li>
</ol>
</blockquote>
<h1 id="24-导入eclipse-web项目发布到Tomcat如果找不到"><a href="#24-导入eclipse-web项目发布到Tomcat如果找不到" class="headerlink" title="24.导入eclipse web项目发布到Tomcat如果找不到"></a>24.导入eclipse web项目发布到Tomcat如果找不到</h1><blockquote>
<ol>
<li>导入eclipse web项目发布到Tomcat如果找不到,可以在环境配置的Facets增加web支持,在Artifacts中增加项目部署模块名</li>
</ol>
</blockquote>
<h1 id="25-每次打开一个新jsp或java文件时-cpu都占用很高-去掉检验即可"><a href="#25-每次打开一个新jsp或java文件时-cpu都占用很高-去掉检验即可" class="headerlink" title="25.每次打开一个新jsp或java文件时,cpu都占用很高,去掉检验即可"></a>25.每次打开一个新jsp或java文件时,cpu都占用很高,去掉检验即可</h1><blockquote>
<p>每次打开一个新jsp或java文件时,cpu都占用很高,去掉检验即可:</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br></pre></td><td class="code"><pre><span class="line">file-&gt;settings-&gt;editor-&gt;inspections</span><br></pre></td></tr></table></figure>
</blockquote>
<h1 id="26-idea增加spring-struts关联文件支持"><a href="#26-idea增加spring-struts关联文件支持" class="headerlink" title="26.idea增加spring/struts关联文件支持"></a>26.idea增加spring/struts关联文件支持</h1><blockquote>
<ol>
<li>project Settings-&gt;Modules-&gt;选中项目右键可添加</li>
</ol>
</blockquote>
<h1 id="27-IDEA开启类修改后自动编译"><a href="#27-IDEA开启类修改后自动编译" class="headerlink" title="27. IDEA开启类修改后自动编译"></a>27. IDEA开启类修改后自动编译</h1><blockquote>
<ol>
<li>File-&gt;setting-&gt;Buil,Execution,Deployment-&gt;compiler=&gt;Make project automatically</li>
<li>编译错误问题解决</li>
<li>Error:java:Compilation failed: internal java compiler error</li>
<li>set中Java complier 设置的问题，项目中有人用jdk1.6有人用jdk1.7版本不一样会一起这个错误</li>
</ol>
</blockquote>
<h1 id="28-提示实现Serializable接口"><a href="#28-提示实现Serializable接口" class="headerlink" title="28.提示实现Serializable接口"></a>28.提示实现Serializable接口</h1><blockquote>
<ol>
<li>使用Eclipse或MyEclipse的同学可能知道，如果implementsSerializable接口时，会提示你生成 serialVersionUID。</li>
<li>但Intellij IDEA 默认没启用这个功能。</li>
<li>Preferences-&gt;IEditor-&gt;nspections-&gt;Serialization issues-&gt;Serializableclass without ’serialVersionUID’，</li>
<li>选中以上后，在你的class中：光标定位在类名前，按Alt+Enter就会提示自动创建 serialVersionUID了</li>
</ol>
</blockquote>
<h1 id="29-演出模式"><a href="#29-演出模式" class="headerlink" title="29.演出模式"></a>29.演出模式</h1><blockquote>
<p>我们可以使用【Presentation Mode】，将IDEA弄到最大，可以让你只关注一个类里面的代码，进行毫无干扰的coding。</p>
<p>可以使用Alt+V快捷键，谈出View视图，然后选择Enter Presentation Mode。效果如下：</p>
</blockquote>
<p><img src="/myblogs/2020/11/26/idea-hotKey-1/0.jpg" alt="img"></p>
<blockquote>
<p>这个模式的好处就是，可以让你更加专注，因为你只能看到特定某个类的代码。可能读者会问，进入这个模式后，我想看其他类的代码怎么办？这个时候，就要考验你快捷键的熟练程度了。你可以使用CTRL+E弹出最近使用的文件。又或者使用CTRL+N和CTRL+SHIFT+N定位文件。</p>
</blockquote>
<blockquote>
<p>如何退出这个模式呢？很简单，使用ALT+V弹出view视图，然后选择Exit Presentation Mode 即可。</p>
<p>但是我强烈建议你不要这么做，因为你是可以在Enter Presentation Mode模式下在IDEA里面做任何事情的。当然前提是，你对IDEA足够熟练。</p>
</blockquote>
<h1 id="30-神奇的Inject-language"><a href="#30-神奇的Inject-language" class="headerlink" title="30.神奇的Inject language"></a>30.神奇的Inject language</h1><blockquote>
<p>如果你使用IDEA在编写JSON字符串的时候，然后要一个一个\去转义双引号的话，就实在太不应该了，又烦又容易出错。</p>
<p>在IDEA可以使用Inject language帮我们自动转义双引号。</p>
</blockquote>
<ul>
<li>先将焦点定位到双引号里面，使用alt+enter快捷键弹出inject language视图，并选中Inject language or reference。</li>
</ul>
<p><img src="/myblogs/2020/11/26/idea-hotKey-1/1.jpg"></p>
<ul>
<li>选择后,切记，要直接按下enter回车键，才能弹出inject language列表。在列表中选择 json组件。</li>
</ul>
<p><img src="/myblogs/2020/11/26/idea-hotKey-1/2.jpg"></p>
<ul>
<li>选择完后。鼠标焦点自动会定位在双引号里面，这个时候你再次使用alt+enter就可以看到</li>
</ul>
<p><img src="/myblogs/2020/11/26/idea-hotKey-1/3.jpg"></p>
<ul>
<li>选中Edit JSON Fragment并回车，就可以看到编辑JSON文件的视图了。</li>
</ul>
<p><img src="/myblogs/2020/11/26/idea-hotKey-1/4.jpg" alt="img"></p>
<ul>
<li>可以看到IDEA确实帮我们自动转义双引号了。如果要退出编辑JSON信息的视图，只需要使用ctrl+F4快捷键即可。</li>
<li>Inject language可以支持的语言和操作多到你难以想象，读者可以自行研究。</li>
</ul>
<h1 id="31-强大的symbol"><a href="#31-强大的symbol" class="headerlink" title="31.强大的symbol"></a>31.强大的symbol</h1><blockquote>
<p>如果你依稀记得某个方法名字几个字母，想在IDEA里面找出来，可以怎么做呢？</p>
<p>直接使用ctrl+shift+alt+n，使用symbol来查找即可。</p>
</blockquote>
<p><img src="/myblogs/2020/11/26/idea-hotKey-1/5.jpg" alt="img"></p>
<h1 id="32-idea快捷键和Windows默认快捷键冲突解决（如：Ctrl-Alt-↑或Ctrl-Alt-F12）"><a href="#32-idea快捷键和Windows默认快捷键冲突解决（如：Ctrl-Alt-↑或Ctrl-Alt-F12）" class="headerlink" title="32.idea快捷键和Windows默认快捷键冲突解决（如：Ctrl+Alt+↑或Ctrl+Alt+F12）"></a>32.idea快捷键和Windows默认快捷键冲突解决（如：Ctrl+Alt+↑或Ctrl+Alt+F12）</h1><blockquote>
<p>解决方式：在桌面右键 - 图形选项 - 快捷键 - 禁止 就可以了</p>
</blockquote>
<h1 id="33-格式化代码时，注释被格式化问题"><a href="#33-格式化代码时，注释被格式化问题" class="headerlink" title="33.格式化代码时，注释被格式化问题"></a>33.格式化代码时，注释被格式化问题</h1><p>解决方案</p>
<blockquote>
<p>将enable javadoc formating取消掉</p>
</blockquote>
<p><img src="/myblogs/2020/11/26/idea-hotKey-1/6.jpg" alt="img"></p>
<h1 id="34-import导入报错，更新maven提示Unable-to-import-maven-project-See-logs-for-details"><a href="#34-import导入报错，更新maven提示Unable-to-import-maven-project-See-logs-for-details" class="headerlink" title="34. import导入报错，更新maven提示Unable to import maven project: See logs for details"></a>34. import导入报错，更新maven提示Unable to import maven project: See logs for details</h1><blockquote>
<p>IDEA2019和Maven3.6.2不兼容导致的，需要把Maven降级到3.6.1版本</p>
<p>或者使用idea自带的maven组件</p>
</blockquote>
<p><img src="/myblogs/2020/11/26/idea-hotKey-1/7.jpg" alt="img"></p>
<h1 id="35-IDEA2019版显示出Run-Dashboard"><a href="#35-IDEA2019版显示出Run-Dashboard" class="headerlink" title="35. IDEA2019版显示出Run Dashboard"></a>35. IDEA2019版显示出Run Dashboard</h1><blockquote>
<ol>
<li>启动按钮，点击“Edit Configrations”</li>
<li>左侧，选择Templates</li>
<li>右侧，选择Configurations available in Run Dashboard</li>
<li>点击“+”，选择Spring Boot</li>
</ol>
</blockquote>
<p><img src="/myblogs/2020/11/26/idea-hotKey-1/8.jpg" alt="img"></p>
<h1 id="36-切换大小写"><a href="#36-切换大小写" class="headerlink" title="36.切换大小写"></a>36.切换大小写</h1><blockquote>
<ul>
<li>idea的切换大小写的默认快捷键是ctrl+shift+u</li>
<li>如果默认快捷键冲突，可以双击shift，输入Toggle Case</li>
</ul>
</blockquote>
<h1 id="37-在IDEA中批量删除代码的注释"><a href="#37-在IDEA中批量删除代码的注释" class="headerlink" title="37. 在IDEA中批量删除代码的注释"></a>37. 在IDEA中批量删除代码的注释</h1><blockquote>
<p>先通过IDEA使用Ctrl+R(或者Ctrl+Shift+R()正则表达式替换</p>
<p>(/*([^*]|[\r\n]|(*+([^*/]|[\r\n])))<em>\</em>+/|[ \t]<em>//.</em>)</p>
<p>或者</p>
<p>(/*([^*]|[\r\n]|(*+([^*/]|[\r\n])))<em>\</em>+/)</p>
</blockquote>
<p><img src="/myblogs/2020/11/26/idea-hotKey-1/9.jpg" alt="img"></p>
<blockquote>
<p>被替换以后格式会变乱，可以通过你自己的热键或者IDEA默认格式化（Ctrl+Alt+L）</p>
</blockquote>
<h1 id="38-忽略css、js文件报错"><a href="#38-忽略css、js文件报错" class="headerlink" title="38.忽略css、js文件报错"></a>38.忽略css、js文件报错</h1><blockquote>
<ul>
<li>选择需要处理的文件，按下快捷键：<code>ctrl+alt+shift+h</code></li>
<li>将高亮级别调到<code>None</code>即可</li>
<li>不消失的话关闭重新打开文件，或重启IDEA</li>
</ul>
</blockquote>
<h1 id="39-Terminal替换成Git-Bash"><a href="#39-Terminal替换成Git-Bash" class="headerlink" title="39.Terminal替换成Git Bash"></a>39.Terminal替换成Git Bash</h1><blockquote>
<p>1.IDEA Terminal替换成Git Bash</p>
<p>在IDEA中，打开settings，设置相应的bash路径<br><code>settings</code>–&gt;<code>Tools</code>–&gt;<code>Terminal</code>–&gt;<code>Shell path: C:\Program Files\Git\bin\bash.exe</code></p>
<p>2.解决git commit注释乱码的问题</p>
<p>在<code>C:\Program Files\Git\etc\bash.bashrc</code>末尾行追加如下内容：</p>
<figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">export LANG&#x3D;&quot;zh_CN.UTF-8&quot;</span><br><span class="line">export LC_ALL&#x3D;&quot;zh_CN.UTF-8&quot;</span><br></pre></td></tr></table></figure>

<p>3.重启</p>
<p>重启IDEA或者关闭当前<code>Terminal</code>的<code>session</code>连接，然后<code>New Session</code>连接。</p>
</blockquote>
<p>转载：</p>
<p>参考链接：</p>
<p><a target="_blank" rel="noopener" href="https://www.pianshen.com/article/61151292626/">https://www.pianshen.com/article/61151292626/</a></p>
<p><a target="_blank" rel="noopener" href="https://blog.csdn.net/hanchao5272/article/details/79087934">https://blog.csdn.net/hanchao5272/article/details/79087934</a></p>

      
    </div>
    
    
    
    
    

    

    
      <div>
        <ul class="post-copyright">
  <li class="post-copyright-author">
    <strong>本文作者：</strong>
    Joy Wang
  </li>
  <li class="post-copyright-link">
    <strong>本文链接：</strong>
    <a href="https://joy_24.gitee.io/2020/11/26/idea-hotKey-1/" title="idea 这样配置，快到飞起">https://joy_24.gitee.io/2020/11/26/idea-hotKey-1/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>
    本博客所有文章除特别声明外，均采用 <a href="https://creativecommons.org/licenses/by-nc-sa/3.0/" rel="external nofollow" target="_blank">CC BY-NC-SA 3.0</a> 许可协议。转载请注明出处！
  </li>
</ul>

      </div>
    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/myblogs/tags/IDEA/" rel="tag"># IDEA</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/myblogs/2020/11/25/rest1/" rel="next" title="REST风格框架实战（从MVC到前后端分离）">
                <i class="fa fa-chevron-left"></i> REST风格框架实战（从MVC到前后端分离）
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/myblogs/2020/11/26/sort-algorithm/" rel="prev" title="程序员必知必会的十大算法">
                程序员必知必会的十大算法 <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image"
                src="/myblogs/uploads/avatar.jpg"
                alt="" />
            
              <p class="site-author-name" itemprop="name"></p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                #<a href="/myblogs/archives%7C%7C%20archive">
                <a href="/myblogs/archives">
              
                  <span class="site-state-item-count">34</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/myblogs/categories/index.html">
                  <span class="site-state-item-count">9</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/myblogs/tags/index.html">
                  <span class="site-state-item-count">20</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          
            <div class="feed-link motion-element">
              <a href="/myblogs/atom.xml" rel="alternate">
                <i class="fa fa-rss"></i>
                RSS
              </a>
            </div>
          

          
            <div class="links-of-author motion-element">
                
                  <span class="links-of-author-item">
                    <a href="https://github.com/joyWJ" target="_blank" title="GitHub">
                      
                        <i class="fa fa-fw fa-github"></i>GitHub</a>
                  </span>
                
                  <span class="links-of-author-item">
                    <a href="wangjianjoy@126.com" target="_blank" title="E-Mail">
                      
                        <i class="fa fa-fw fa-envelope"></i>E-Mail</a>
                  </span>
                
            </div>
          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#1-%E8%AE%BE%E7%BD%AEmaven"><span class="nav-number">1.</span> <span class="nav-text">1.设置maven</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#2-IDEA-%E8%AE%BE%E7%BD%AE%E4%BB%A3%E7%A0%81%E8%A1%8C%E5%AE%BD%E5%BA%A6"><span class="nav-number">2.</span> <span class="nav-text">2.IDEA 设置代码行宽度</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#3-IDEA-%E6%8F%90%E7%A4%BA%E4%B8%8D%E5%8C%BA%E5%88%86%E5%A4%A7%E5%B0%8F%E5%86%99"><span class="nav-number">3.</span> <span class="nav-text">3.IDEA 提示不区分大小写</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#4-IntelliJ%E5%BC%BA%E5%88%B6%E6%9B%B4%E6%96%B0Maven-Dependencies"><span class="nav-number">4.</span> <span class="nav-text">4.IntelliJ强制更新Maven Dependencies</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#5-idea%E7%9A%84%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE%E9%BB%98%E8%AE%A4%E4%BF%9D%E5%AD%98%E4%BD%8D%E7%BD%AE"><span class="nav-number">5.</span> <span class="nav-text">5.idea的环境配置默认保存位置</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#6-%E9%9A%90%E8%97%8F%E4%B8%8D%E6%83%B3%E7%9C%8B%E5%88%B0%E7%9A%84%E6%96%87%E4%BB%B6%E6%88%96%E8%80%85%E6%96%87%E4%BB%B6%E5%A4%B9%EF%BC%88%E7%B1%BB%E4%BC%BCeclipse%E7%9A%84filter%E5%8A%9F%E8%83%BD%EF%BC%89"><span class="nav-number">6.</span> <span class="nav-text">6.隐藏不想看到的文件或者文件夹（类似eclipse的filter功能）</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#7-%E4%BF%AE%E6%94%B9%E4%B8%BAEclipse%E5%BF%AB%E6%8D%B7%E9%94%AE"><span class="nav-number">7.</span> <span class="nav-text">7.修改为Eclipse快捷键</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#8-%E4%BF%AE%E6%94%B9%E9%BB%98%E8%AE%A4%E8%AE%BE%E7%BD%AE%E2%80%93default-setting"><span class="nav-number">8.</span> <span class="nav-text">8.修改默认设置–default setting</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#9-%E4%BF%AE%E6%94%B9%E6%99%BA%E8%83%BD%E6%8F%90%E7%A4%BA%E5%BF%AB%E6%8D%B7%E9%94%AE"><span class="nav-number">9.</span> <span class="nav-text">9.修改智能提示快捷键</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#10-%E6%9F%A5%E6%89%BE%E5%BF%AB%E6%8D%B7%E9%94%AE%E5%86%B2%E7%AA%81%E9%97%AE%E9%A2%98%E5%A4%84%E7%90%86"><span class="nav-number">10.</span> <span class="nav-text">10.查找快捷键冲突问题处理</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#11-%E6%98%BE%E7%A4%BA%E8%A1%8C%E5%8F%B7"><span class="nav-number">11.</span> <span class="nav-text">11.显示行号</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#12-%E4%BB%A3%E7%A0%81%E6%99%BA%E8%83%BD%E6%8F%90%E7%A4%BA%EF%BC%8C%E5%BF%BD%E7%95%A5%E5%A4%A7%E5%B0%8F%E5%86%99"><span class="nav-number">12.</span> <span class="nav-text">12.代码智能提示，忽略大小写</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#13-%E7%94%A8-%E6%A0%87%E8%AF%86%E7%BC%96%E8%BE%91%E8%BF%87%E7%9A%84%E6%96%87%E4%BB%B6"><span class="nav-number">13.</span> <span class="nav-text">13.用*标识编辑过的文件</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#14-%E5%85%B3%E9%97%AD%E8%87%AA%E5%8A%A8%E4%BB%A3%E7%A0%81%E6%8F%90%E7%A4%BA"><span class="nav-number">14.</span> <span class="nav-text">14.关闭自动代码提示</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#15-%E5%B8%B8%E7%94%A8%E5%BF%AB%E6%8D%B7%E9%94%AE"><span class="nav-number">15.</span> <span class="nav-text">15.常用快捷键</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#16-svn-%E4%B8%8D%E8%83%BD%E5%90%8C%E6%AD%A5%E4%BB%A3%E7%A0%81%E9%97%AE%E9%A2%98%E4%BF%AE%E6%AD%A3"><span class="nav-number">16.</span> <span class="nav-text">16.svn 不能同步代码问题修正</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#17-%E8%AE%BE%E7%BD%AEidea%E7%9A%84SVN%E5%BF%BD%E7%95%A5%E6%8E%89-iml%E6%96%87%E4%BB%B6"><span class="nav-number">17.</span> <span class="nav-text">17.设置idea的SVN忽略掉*.iml文件</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#18-%E6%94%B9%E5%8F%98%E7%BC%96%E8%BE%91%E6%96%87%E6%9C%AC%E5%AD%97%E4%BD%93%E5%A4%A7%E5%B0%8F"><span class="nav-number">18.</span> <span class="nav-text">18.改变编辑文本字体大小</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#19-IDEA%E7%BC%96%E7%A0%81%E8%AE%BE%E7%BD%AE"><span class="nav-number">19.</span> <span class="nav-text">19.IDEA编码设置</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#20-Live-Templates"><span class="nav-number">20.</span> <span class="nav-text">20.Live Templates</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#21-%E9%85%8D%E7%BD%AEtomcat%E5%8F%82%E6%95%B0"><span class="nav-number">21.</span> <span class="nav-text">21.配置tomcat参数</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#22-idea%E5%AE%89%E8%A3%85%E6%8F%92%E4%BB%B6%E7%9A%84%E6%96%B9%E6%B3%95"><span class="nav-number">22.</span> <span class="nav-text">22.idea安装插件的方法</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#23-%E8%B0%83%E6%95%B4idea%E5%90%AF%E5%8A%A8%E6%97%B6%E7%9A%84%E5%86%85%E5%AD%98%E9%85%8D%E7%BD%AE%E5%8F%82%E6%95%B0"><span class="nav-number">23.</span> <span class="nav-text">23.调整idea启动时的内存配置参数</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#24-%E5%AF%BC%E5%85%A5eclipse-web%E9%A1%B9%E7%9B%AE%E5%8F%91%E5%B8%83%E5%88%B0Tomcat%E5%A6%82%E6%9E%9C%E6%89%BE%E4%B8%8D%E5%88%B0"><span class="nav-number">24.</span> <span class="nav-text">24.导入eclipse web项目发布到Tomcat如果找不到</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#25-%E6%AF%8F%E6%AC%A1%E6%89%93%E5%BC%80%E4%B8%80%E4%B8%AA%E6%96%B0jsp%E6%88%96java%E6%96%87%E4%BB%B6%E6%97%B6-cpu%E9%83%BD%E5%8D%A0%E7%94%A8%E5%BE%88%E9%AB%98-%E5%8E%BB%E6%8E%89%E6%A3%80%E9%AA%8C%E5%8D%B3%E5%8F%AF"><span class="nav-number">25.</span> <span class="nav-text">25.每次打开一个新jsp或java文件时,cpu都占用很高,去掉检验即可</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#26-idea%E5%A2%9E%E5%8A%A0spring-struts%E5%85%B3%E8%81%94%E6%96%87%E4%BB%B6%E6%94%AF%E6%8C%81"><span class="nav-number">26.</span> <span class="nav-text">26.idea增加spring&#x2F;struts关联文件支持</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#27-IDEA%E5%BC%80%E5%90%AF%E7%B1%BB%E4%BF%AE%E6%94%B9%E5%90%8E%E8%87%AA%E5%8A%A8%E7%BC%96%E8%AF%91"><span class="nav-number">27.</span> <span class="nav-text">27. IDEA开启类修改后自动编译</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#28-%E6%8F%90%E7%A4%BA%E5%AE%9E%E7%8E%B0Serializable%E6%8E%A5%E5%8F%A3"><span class="nav-number">28.</span> <span class="nav-text">28.提示实现Serializable接口</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#29-%E6%BC%94%E5%87%BA%E6%A8%A1%E5%BC%8F"><span class="nav-number">29.</span> <span class="nav-text">29.演出模式</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#30-%E7%A5%9E%E5%A5%87%E7%9A%84Inject-language"><span class="nav-number">30.</span> <span class="nav-text">30.神奇的Inject language</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#31-%E5%BC%BA%E5%A4%A7%E7%9A%84symbol"><span class="nav-number">31.</span> <span class="nav-text">31.强大的symbol</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#32-idea%E5%BF%AB%E6%8D%B7%E9%94%AE%E5%92%8CWindows%E9%BB%98%E8%AE%A4%E5%BF%AB%E6%8D%B7%E9%94%AE%E5%86%B2%E7%AA%81%E8%A7%A3%E5%86%B3%EF%BC%88%E5%A6%82%EF%BC%9ACtrl-Alt-%E2%86%91%E6%88%96Ctrl-Alt-F12%EF%BC%89"><span class="nav-number">32.</span> <span class="nav-text">32.idea快捷键和Windows默认快捷键冲突解决（如：Ctrl+Alt+↑或Ctrl+Alt+F12）</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#33-%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BB%A3%E7%A0%81%E6%97%B6%EF%BC%8C%E6%B3%A8%E9%87%8A%E8%A2%AB%E6%A0%BC%E5%BC%8F%E5%8C%96%E9%97%AE%E9%A2%98"><span class="nav-number">33.</span> <span class="nav-text">33.格式化代码时，注释被格式化问题</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#34-import%E5%AF%BC%E5%85%A5%E6%8A%A5%E9%94%99%EF%BC%8C%E6%9B%B4%E6%96%B0maven%E6%8F%90%E7%A4%BAUnable-to-import-maven-project-See-logs-for-details"><span class="nav-number">34.</span> <span class="nav-text">34. import导入报错，更新maven提示Unable to import maven project: See logs for details</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#35-IDEA2019%E7%89%88%E6%98%BE%E7%A4%BA%E5%87%BARun-Dashboard"><span class="nav-number">35.</span> <span class="nav-text">35. IDEA2019版显示出Run Dashboard</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#36-%E5%88%87%E6%8D%A2%E5%A4%A7%E5%B0%8F%E5%86%99"><span class="nav-number">36.</span> <span class="nav-text">36.切换大小写</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#37-%E5%9C%A8IDEA%E4%B8%AD%E6%89%B9%E9%87%8F%E5%88%A0%E9%99%A4%E4%BB%A3%E7%A0%81%E7%9A%84%E6%B3%A8%E9%87%8A"><span class="nav-number">37.</span> <span class="nav-text">37. 在IDEA中批量删除代码的注释</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#38-%E5%BF%BD%E7%95%A5css%E3%80%81js%E6%96%87%E4%BB%B6%E6%8A%A5%E9%94%99"><span class="nav-number">38.</span> <span class="nav-text">38.忽略css、js文件报错</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#39-Terminal%E6%9B%BF%E6%8D%A2%E6%88%90Git-Bash"><span class="nav-number">39.</span> <span class="nav-text">39.Terminal替换成Git Bash</span></a></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      
        <div class="back-to-top">
          <i class="fa fa-arrow-up"></i>
          
            <span id="scrollpercent"><span>0</span>%</span>
          
        </div>
      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright">&copy; <span itemprop="copyrightYear">2022</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Joy Wang</span>

  
</div>


  <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>



  <span class="post-meta-divider">|</span>



  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Mist</a> v5.1.4</div>




        







        
      </div>
    </footer>

    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="/myblogs/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/myblogs/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/myblogs/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/myblogs/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/myblogs/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/myblogs/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/myblogs/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/myblogs/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/myblogs/js/src/motion.js?v=5.1.4"></script>



  
  

  
  <script type="text/javascript" src="/myblogs/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/myblogs/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/myblogs/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  












  

  <script type="text/javascript">
    // Popup Window;
    var isfetched = false;
    var isXml = true;
    // Search DB path;
    var search_path = "search.xml";
    if (search_path.length === 0) {
      search_path = "search.xml";
    } else if (/json$/i.test(search_path)) {
      isXml = false;
    }
    var path = "/myblogs/" + search_path;
    // monitor main search box;

    var onPopupClose = function (e) {
      $('.popup').hide();
      $('#local-search-input').val('');
      $('.search-result-list').remove();
      $('#no-result').remove();
      $(".local-search-pop-overlay").remove();
      $('body').css('overflow', '');
    }

    function proceedsearch() {
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay"></div>')
        .css('overflow', 'hidden');
      $('.search-popup-overlay').click(onPopupClose);
      $('.popup').toggle();
      var $localSearchInput = $('#local-search-input');
      $localSearchInput.attr("autocapitalize", "none");
      $localSearchInput.attr("autocorrect", "off");
      $localSearchInput.focus();
    }

    // search function;
    var searchFunc = function(path, search_id, content_id) {
      'use strict';

      // start loading animation
      $("body")
        .append('<div class="search-popup-overlay local-search-pop-overlay">' +
          '<div id="search-loading-icon">' +
          '<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>' +
          '</div>' +
          '</div>')
        .css('overflow', 'hidden');
      $("#search-loading-icon").css('margin', '20% auto 0 auto').css('text-align', 'center');

      $.ajax({
        url: path,
        dataType: isXml ? "xml" : "json",
        async: true,
        success: function(res) {
          // get the contents from search data
          isfetched = true;
          $('.popup').detach().appendTo('.header-inner');
          var datas = isXml ? $("entry", res).map(function() {
            return {
              title: $("title", this).text(),
              content: $("content",this).text(),
              url: $("url" , this).text()
            };
          }).get() : res;
          var input = document.getElementById(search_id);
          var resultContent = document.getElementById(content_id);
          var inputEventFunction = function() {
            var searchText = input.value.trim().toLowerCase();
            var keywords = searchText.split(/[\s\-]+/);
            if (keywords.length > 1) {
              keywords.push(searchText);
            }
            var resultItems = [];
            if (searchText.length > 0) {
              // perform local searching
              datas.forEach(function(data) {
                var isMatch = false;
                var hitCount = 0;
                var searchTextCount = 0;
                var title = data.title.trim();
                var titleInLowerCase = title.toLowerCase();
                var content = data.content.trim().replace(/<[^>]+>/g,"");
                var contentInLowerCase = content.toLowerCase();
                var articleUrl = decodeURIComponent(data.url);
                var indexOfTitle = [];
                var indexOfContent = [];
                // only match articles with not empty titles
                if(title != '') {
                  keywords.forEach(function(keyword) {
                    function getIndexByWord(word, text, caseSensitive) {
                      var wordLen = word.length;
                      if (wordLen === 0) {
                        return [];
                      }
                      var startPosition = 0, position = [], index = [];
                      if (!caseSensitive) {
                        text = text.toLowerCase();
                        word = word.toLowerCase();
                      }
                      while ((position = text.indexOf(word, startPosition)) > -1) {
                        index.push({position: position, word: word});
                        startPosition = position + wordLen;
                      }
                      return index;
                    }

                    indexOfTitle = indexOfTitle.concat(getIndexByWord(keyword, titleInLowerCase, false));
                    indexOfContent = indexOfContent.concat(getIndexByWord(keyword, contentInLowerCase, false));
                  });
                  if (indexOfTitle.length > 0 || indexOfContent.length > 0) {
                    isMatch = true;
                    hitCount = indexOfTitle.length + indexOfContent.length;
                  }
                }

                // show search results

                if (isMatch) {
                  // sort index by position of keyword

                  [indexOfTitle, indexOfContent].forEach(function (index) {
                    index.sort(function (itemLeft, itemRight) {
                      if (itemRight.position !== itemLeft.position) {
                        return itemRight.position - itemLeft.position;
                      } else {
                        return itemLeft.word.length - itemRight.word.length;
                      }
                    });
                  });

                  // merge hits into slices

                  function mergeIntoSlice(text, start, end, index) {
                    var item = index[index.length - 1];
                    var position = item.position;
                    var word = item.word;
                    var hits = [];
                    var searchTextCountInSlice = 0;
                    while (position + word.length <= end && index.length != 0) {
                      if (word === searchText) {
                        searchTextCountInSlice++;
                      }
                      hits.push({position: position, length: word.length});
                      var wordEnd = position + word.length;

                      // move to next position of hit

                      index.pop();
                      while (index.length != 0) {
                        item = index[index.length - 1];
                        position = item.position;
                        word = item.word;
                        if (wordEnd > position) {
                          index.pop();
                        } else {
                          break;
                        }
                      }
                    }
                    searchTextCount += searchTextCountInSlice;
                    return {
                      hits: hits,
                      start: start,
                      end: end,
                      searchTextCount: searchTextCountInSlice
                    };
                  }

                  var slicesOfTitle = [];
                  if (indexOfTitle.length != 0) {
                    slicesOfTitle.push(mergeIntoSlice(title, 0, title.length, indexOfTitle));
                  }

                  var slicesOfContent = [];
                  while (indexOfContent.length != 0) {
                    var item = indexOfContent[indexOfContent.length - 1];
                    var position = item.position;
                    var word = item.word;
                    // cut out 100 characters
                    var start = position - 20;
                    var end = position + 80;
                    if(start < 0){
                      start = 0;
                    }
                    if (end < position + word.length) {
                      end = position + word.length;
                    }
                    if(end > content.length){
                      end = content.length;
                    }
                    slicesOfContent.push(mergeIntoSlice(content, start, end, indexOfContent));
                  }

                  // sort slices in content by search text's count and hits' count

                  slicesOfContent.sort(function (sliceLeft, sliceRight) {
                    if (sliceLeft.searchTextCount !== sliceRight.searchTextCount) {
                      return sliceRight.searchTextCount - sliceLeft.searchTextCount;
                    } else if (sliceLeft.hits.length !== sliceRight.hits.length) {
                      return sliceRight.hits.length - sliceLeft.hits.length;
                    } else {
                      return sliceLeft.start - sliceRight.start;
                    }
                  });

                  // select top N slices in content

                  var upperBound = parseInt('1');
                  if (upperBound >= 0) {
                    slicesOfContent = slicesOfContent.slice(0, upperBound);
                  }

                  // highlight title and content

                  function highlightKeyword(text, slice) {
                    var result = '';
                    var prevEnd = slice.start;
                    slice.hits.forEach(function (hit) {
                      result += text.substring(prevEnd, hit.position);
                      var end = hit.position + hit.length;
                      result += '<b class="search-keyword">' + text.substring(hit.position, end) + '</b>';
                      prevEnd = end;
                    });
                    result += text.substring(prevEnd, slice.end);
                    return result;
                  }

                  var resultItem = '';

                  if (slicesOfTitle.length != 0) {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + highlightKeyword(title, slicesOfTitle[0]) + "</a>";
                  } else {
                    resultItem += "<li><a href='" + articleUrl + "' class='search-result-title'>" + title + "</a>";
                  }

                  slicesOfContent.forEach(function (slice) {
                    resultItem += "<a href='" + articleUrl + "'>" +
                      "<p class=\"search-result\">" + highlightKeyword(content, slice) +
                      "...</p>" + "</a>";
                  });

                  resultItem += "</li>";
                  resultItems.push({
                    item: resultItem,
                    searchTextCount: searchTextCount,
                    hitCount: hitCount,
                    id: resultItems.length
                  });
                }
              })
            };
            if (keywords.length === 1 && keywords[0] === "") {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-search fa-5x" /></div>'
            } else if (resultItems.length === 0) {
              resultContent.innerHTML = '<div id="no-result"><i class="fa fa-frown-o fa-5x" /></div>'
            } else {
              resultItems.sort(function (resultLeft, resultRight) {
                if (resultLeft.searchTextCount !== resultRight.searchTextCount) {
                  return resultRight.searchTextCount - resultLeft.searchTextCount;
                } else if (resultLeft.hitCount !== resultRight.hitCount) {
                  return resultRight.hitCount - resultLeft.hitCount;
                } else {
                  return resultRight.id - resultLeft.id;
                }
              });
              var searchResultList = '<ul class=\"search-result-list\">';
              resultItems.forEach(function (result) {
                searchResultList += result.item;
              })
              searchResultList += "</ul>";
              resultContent.innerHTML = searchResultList;
            }
          }

          if ('auto' === 'auto') {
            input.addEventListener('input', inputEventFunction);
          } else {
            $('.search-icon').click(inputEventFunction);
            input.addEventListener('keypress', function (event) {
              if (event.keyCode === 13) {
                inputEventFunction();
              }
            });
          }

          // remove loading animation
          $(".local-search-pop-overlay").remove();
          $('body').css('overflow', '');

          proceedsearch();
        }
      });
    }

    // handle and trigger popup window;
    $('.popup-trigger').click(function(e) {
      e.stopPropagation();
      if (isfetched === false) {
        searchFunc(path, 'local-search-input', 'local-search-result');
      } else {
        proceedsearch();
      };
    });

    $('.popup-btn-close').click(onPopupClose);
    $('.popup').click(function(e){
      e.stopPropagation();
    });
    $(document).on('keyup', function (event) {
      var shouldDismissSearchPopup = event.which === 27 &&
        $('.search-popup').is(':visible');
      if (shouldDismissSearchPopup) {
        onPopupClose();
      }
    });
  </script>





  

  

  

  
  

  

  

  

</body>
</html>
